// 自定义路由组件
customElements.define('router-view', class extends HTMLElement {
    constructor() {
        super()
        const template = document.createElement('template')
        template.id = 'router-view'
        template.innerHTML = '<div><slot name="content"></slot></div>'
        const templateContent = template.content

        const shadowRoot = this.attachShadow({ mode: 'open' })
        shadowRoot.appendChild(templateContent.cloneNode(true))
    }
})
